<?php
require_once("includes/pagetop.php");

if(isset($_REQUEST['actcode']) && $_REQUEST['actcode']!="")
{
    $userinfoqry="select User_ID from af_users where Verify_Random_String=:Verify_Random_String";
    $userinfo=$pdodbobj->fetch_array($pdodbobj->query($userinfoqry,array(":Verify_Random_String"=>$_REQUEST['actcode'])));
    
    if(count($userinfo)>0)
    {
        $updatearr=array("Activation_Date"=>time(),"Verify_Random_String"=>"","Activation_Status"=>"Active");
        $pdodbobj->updateData("af_users",$updatearr,array("User_ID"=>$userinfo[0]['User_ID']));
        
        $successmsg="Your Account is activated successfully. Now you can continue Allyfolio.";
    }
    else
    {
        $errormsg="Please use correct link to activate your account.";
    }
}
else
{
    $errormsg="Please use correct link to activate your account.";
}    
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>AllyFolio | Activation  </title>
<link href="css/style.css" rel="stylesheet" type="text/css" media="all"  />

<script src="js/general.js"></script>

<link rel="stylesheet" href="alertify/themes/alertify.core.css" />
<link rel="stylesheet" href="alertify/themes/alertify.default.css" id="toggleCSS" />
<script src="alertify/lib/alertify.min.js"></script>	
<script src="js/jquery1.10.2.min.js">
</script>
<script>
$(document).ready(function(){
  $(".drop_btn").click(function(){
    $(".showbox").toggle();
  });
});
</script>
</head>

<body>

	<div>
    <!--=================Header Start=======================-->
	<?php
    
    //$pageheading="Sign Up";
    require_once("includes/header.php");
    
    ?>
    <!--=================Body Contain Start=======================-->
    <div class="wrapper">
    	<div class="header">
        	<div class="signup_wrap">
            	<div <?php if(isset($errormsg)){ echo "class='errormsg'"; }else{ echo "class='successmsg'"; } ?> style="font-weight: bold;font-size:17px;min-height:220px;text-align: center;"><?php if(isset($errormsg)){ echo $errormsg; }else{ echo $successmsg; } ?></div>
       		</div>
        </div>
    </div>
            
            
		</div>
    </div>
    <input type="hidden" id="captcha"  value="<?php echo $_SESSION['captcha'] ?>"/>
    <div class="clearfix"></div>
    <!--=================Body Contain end=======================-->
    </div>
<?php
    require_once("includes/footer.php");
?>